{{! -------------------------------------------------------------------------- }}
{{! Copyright 2002-2016, OpenNebula Project, OpenNebula Systems                }}
{{!                                                                            }}
{{! Licensed under the Apache License, Version 2.0 (the "License"); you may    }}
{{! not use this file except in compliance with the License. You may obtain    }}
{{! a copy of the License at                                                   }}
{{!                                                                            }}
{{! http://www.apache.org/licenses/LICENSE-2.0                                 }}
{{!                                                                            }}
{{! Unless required by applicable law or agreed to in writing, software        }}
{{! distributed under the License is distributed on an "AS IS" BASIS,          }}
{{! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   }}
{{! See the License for the specific language governing permissions and        }}
{{! limitations under the License.                                             }}
{{! -------------------------------------------------------------------------- }}

<div>
  <form data-abide novalidate id="{{formPanelId}}Wizard" class="custom creation">
    <div class="row">
      <div class="medium-6 columns">
        <label for="host_type">{{tr "Type"}}</label>
        <select id="host_type_mad" name="host_type">
          {{#each vmMadNameList}}
            <option value="{{this.driverName}}">{{this.displayName}}</option>
          {{/each}}
          <option value="custom">{{tr "Custom"}}</option>
        </select>
      </div>
      <div class="medium-6 columns" id="cluster_select">
        <label for="host_cluster_id">{{tr "Cluster"}}</label>
        <div id="host_cluster_id" name="host_cluster_id"></div>
      </div>
    </div>
    <div class="row">
      <div class="medium-6 columns" id="name_container">
        <label for="name">{{tr "Hostname"}}</label>
        <input type="text" name="name" id="name" required />
      </div>
      <div class="medium-6 columns">
      </div>
    </div>
    <div class="drivers">
      <fieldset>
        <legend>{{tr "Drivers"}}</legend>
        <div class="row">
          <div class="medium-6 columns">
            <div class="manager clear row" id="vmm_mads">
              <div class="large-12 columns">
                <label for="vmm">{{tr "Virtualization"}}</label>
                <select id="vmm_mad" name="vmm">
                  {{#each vmMadNameList}}
                    <option value="{{this.driverName}}">{{this.displayName}}</option>
                  {{/each}}
                  <option value="custom">{{tr "Custom"}}</option>
                </select>
              </div>
              <div class="large-12 columns">
                <label>{{tr "Custom VMM_MAD"}}</label>
                <input type="text" name="custom_vmm_mad" />
              </div>
            </div>
          </div>
          <div class="medium-6 columns">
            <div class="manager clear row" id="im_mads">
              <div class="large-12 columns">
                <label for="im">{{tr "Information"}}</label>
                <select id="im_mad" name="im">
                  {{#each imMadNameList}}
                    <option value="{{this.driverName}}">{{this.displayName}}</option>
                  {{/each}}
                  <option value="custom">{{tr "Custom"}}</option>
                </select>
              </div>
              <div class="large-12 columns">
                <label>{{tr "Custom IM_MAD"}}</label>
                <input type="text" name="custom_im_mad" />
              </div>
            </div>
          </div>
        </div>
      </fieldset>
    </div>
  </form>
  <form data-abide novalidate class="vcenter_credentials" action="">
    <fieldset>
      <legend>{{tr "vCenter"}}</legend>
      <div class="row">
        <div class="large-3 medium-6 columns">
          <label for="vcenter_host">{{tr "Hostname"}}</label>
          <input type="text" name="vcenter_host" id="vcenter_host" required />
        </div>
        <div class="large-3 medium-6 columns">
          <label for="vcenter_user">{{tr "User"}}</label>
          <input type="text" name="vcenter_user" id="vcenter_user" required />
        </div>
        <div class="large-3 medium-6 columns">
          <label for="vcenter_password">{{tr "Password"}}</label>
          <input type="password" name="vcenter_password" id="vcenter_password" required />
        </div>
        <div class="large-3 medium-6 columns">
          <label>&nbsp;</label>
          <button type="submit" id="get_vcenter_clusters" class="button radius">
            {{tr "Get vCenter Clusters"}}
          </button>
        </div>
      </div>
      <div class="row collapse">
        {{{vCenterClustersHTML}}}
      </div>
      <div class="row import_vcenter_clusters_div" hidden>
        <div class="large-12 columns">
          <br>
          <a class="button right success" id="import_vcenter_clusters">{{tr "Import"}}</a>
        </div>
      </div>
    </fieldset>
  </form>
</div>